from django.urls import include, path
from rest_framework.routers import DefaultRouter

from operator_orders.views import OrderInfoOperateViewset, DiscountCouponOperateViewset, Courier_CompanyOperateViewset, \
    Sales_statisticsView, ReasonOperateViewset, Business_AddressOperateViewset, Send_Out_Viewset, \
    OrderGoodsOperateViewset, Company_List, OrderGoodsIsReturnViewset, Feedback_Viewset, Change_Goods_Viewset, \
    Get_Business_AddressViewset
from orders.views import Order_CouponViewSet

router = DefaultRouter()
router.register(r'orderinfo', OrderInfoOperateViewset, base_name='orderinfooperator')  # 订单管理
router.register(r'ordergoods_check', OrderGoodsOperateViewset, base_name='ordergoods_check')  # 订单管理
router.register(r'discountcoupon', DiscountCouponOperateViewset,)  # 用户优惠券管理
router.register(r'reason', ReasonOperateViewset,)  # 退换货原因管理
router.register(r'courier_company', Courier_CompanyOperateViewset,)  # 快递公司管理
router.register(r'business_address', Business_AddressOperateViewset,)  # 退换货地址管理
router.register(r'send_out', Send_Out_Viewset,)  # 发货
router.register(r'ordergoods_isreturn', OrderGoodsIsReturnViewset,)  # 退换货商品
router.register(r'feedback', Feedback_Viewset,)  # 意见发聩
router.register(r'change_goods', Change_Goods_Viewset,)  # 售后更换商品查询
router.register(r'get_businessaddress', Get_Business_AddressViewset,)  # 售后可用地址列表查询
# router.register(r'ordercoupon', Order_CouponView,)  # 查询当前商品列表可用优惠券列表

urlpatterns = [
    path('', include(router.urls)),
    path('sales_statistics/', Sales_statisticsView.as_view(), name='sales_statistics'),  # 销量统计页面
    path('company_list/', Company_List.as_view()),  # 销量统计页面
]

